package demo;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class HelloWorld {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("fos.dat");
        String line = "一袋米要扛几楼!";
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        String line2 = "分支上新增内容";
        fos.write(line2.getBytes(StandardCharsets.UTF_8));
        line = "在主线上新添加了一句写入内容";
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        line = ("链接成功了吗？我这样修改一行看得到吗？");
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        line = "分支上又添加了新的内容!!!!!!!!!!!!!";
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        System.out.println("写出完毕");
        fos.close();
    }
}
